<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>v-html指令</title>
<!--引入Vue库-->
<script src="vue.js"></script>
</head>
<body>	
<div id="app">
    <div v-html="info"></div>
    <div v-html="bookDetails()"></div>
</div>
<script>
  var vm=new Vue({ 
      el: '#app',
      data: {
          info: '图书详情',
          bookName: 'HTML5+CSS3移动Web开发实战',
          publisher:'人民邮电出版社',
          price:58,
          number:2,
          amount:116
          },
      methods: {
          bookDetails: function() {
              var strInfo='图书名称：'+this.bookName + '<br>'+
                   '出&nbsp;&nbsp;版&nbsp;&nbsp;社：'+this.publisher+'<br>'+
                   '价&nbsp;&nbsp;&nbsp;&nbsp;格：￥'+this.price+'<br>'+
                   '数&nbsp;&nbsp;&nbsp;&nbsp;量：'+ this.number+'<br>'+
                   '金&nbsp;&nbsp;&nbsp;&nbsp;额：' +this.amount+'元';
              return strInfo ;
            }
          }
      })
</script>
</body>
</html>